﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RelationExpertSystem.Relation
{
    // Strategy object to encapslate logic of object
    public interface IRelation
    {
        /// <summary>
        /// Returns whether or not b is a's relation
        /// </summary>
        /// <param name="a">The origin person</param>
        /// <param name="b">The potential relative</param>
        /// <returns></returns>
        bool IsRelated(Person a, Person b);

        /// <summary>
        /// Adds b as a's relation
        /// </summary>
        /// <param name="a"></param>
        /// <param name="b"></param>
        void SetRelation(Person a, Person b);
        // consider returning bool if new relation

        /// <summary>
        /// Returns an enumerable of the IRelation checks that this relies on.
        /// </summary>
        /// <returns>Relations that must be checked before this one.</returns>
        IEnumerable<IRelation> GetDependencies();
    }
}